package day0513;

import java.util.Arrays;

public class Test7 {
    public static void main(String[] args) {
        /*int[] a={2, 6, 4, 3, 7 ,8};
        //a.length ： 获取数组的元素个数
        for (int i = 0; i < a.length ; i++) {
            int ele=a[i];
            System.out.println(ele);
        }


        int[] b=new int[6];
        b[0]=1;
        b[1]=1;*/


       /* System.out.println(a[4]);

        int ele=a[4];
        System.out.println(ele);*/
        /*long[] a2=new long[52];
        a2[0]=1;//0  1
        for (int i = 2; i <=51 ; i++) {
            a2[i]=a2[i-1]+a2[i-2];
            System.out.println(a2[i]);
        }*/


        long[] a2=new long[50];
        a2[0]=1;
        a2[1]=1;
        for (int i = 2; i < 50 ; i++) {//给第2个，第3个。。。。。第49个
            a2[i]=a2[i-1]+a2[i-2];
        }
        System.out.println(Arrays.toString(a2));



    }
}
